//
//  MHMySettingsView.m
//  ManHua
//
//  Created by 江子安 on 15/10/29.
//  Copyright © 2015年 蓝欧科技. All rights reserved.
//

#import "MHMySettingsView.h"

@implementation MHMySettingsView




- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _scrollView = [[UIScrollView alloc]initWithFrame:self.bounds];
        [self addSubview:_scrollView];
        
        _cleanImgLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 20, Width - 20, 40)];
        _cleanImgLabel.text = @"清理图片缓存";
        _cleanAllCacheLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 60, Width - 20, 40)];
        _cleanAllCacheLabel.text = @"清理所有缓存";
        _screenLightLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 100, Width - 20, 40)];
        _screenLightLabel.text = @"阅读屏幕常亮";
        _pushNotificationLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 140, Width - 20, 40)];
        _pushNotificationLabel.text = @"更新推送通知";
        
        _feedbackLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 220, Width - 20, 40)];
        _feedbackLabel.text = @"吐槽、反馈我们";
        _scoreLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 260, Width - 20, 40)];
        _scoreLabel.text = @"给我们评分";
        _reliefLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 300, Width - 20, 40)];
        _reliefLabel.text = @"免责声明";
        _transcodingLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 340, Width - 20, 40)];
        _transcodingLabel.text = @"页面转码声明";
        
        _privacyLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 380, Width - 20, 40)];
        _privacyLabel.text = @"隐私政策";
        
        
        
        _lightSwitch = [[UISwitch alloc]initWithFrame:CGRectMake(Width - 60, 105, 50, 30)];
        _pushSwitch = [[UISwitch alloc]initWithFrame:CGRectMake(Width - 60, 145, 50, 30)];
        
        // 这是一堆线
        UIView *view1 = [[UIView alloc]initWithFrame:CGRectMake(0, 20, Width, 1)];
        UIView *view2 = [[UIView alloc]initWithFrame:CGRectMake(20, 60, Width-20, 1)];
        UIView *view3 = [[UIView alloc]initWithFrame:CGRectMake(20, 100, Width-20, 1)];
        UIView *view4 = [[UIView alloc]initWithFrame:CGRectMake(20, 140, Width-20, 1)];
        UIView *view5 = [[UIView alloc]initWithFrame:CGRectMake(0, 180, Width-20, 1)];
        UIView *view6 = [[UIView alloc]initWithFrame:CGRectMake(0, 220, Width-20, 1)];
        UIView *view7 = [[UIView alloc]initWithFrame:CGRectMake(20, 260, Width-20, 1)];
        UIView *view8 = [[UIView alloc]initWithFrame:CGRectMake(20, 300, Width-20, 1)];
        UIView *view9 = [[UIView alloc]initWithFrame:CGRectMake(20, 340, Width-20, 1)];
        UIView *view10 = [[UIView alloc]initWithFrame:CGRectMake(20, 380, Width-20, 1)];
        UIView *view11 = [[UIView alloc]initWithFrame:CGRectMake(0, 420, Width, 1)];
        view1.backgroundColor = [UIColor grayColor];
        view2.backgroundColor = [UIColor grayColor];
        view3.backgroundColor = [UIColor grayColor];
        view4.backgroundColor = [UIColor grayColor];
        view5.backgroundColor = [UIColor grayColor];
        view6.backgroundColor = [UIColor grayColor];
        view7.backgroundColor = [UIColor grayColor];
        view8.backgroundColor = [UIColor grayColor];
        view9.backgroundColor = [UIColor grayColor];
        view10.backgroundColor = [UIColor grayColor];
        view11.backgroundColor = [UIColor grayColor];
        
        [self addSubview:view1];
        [self addSubview:view2];
        [self addSubview:view3];
        [self addSubview:view4];
        [self addSubview:view5];
        [self addSubview:view6];
        [self addSubview:view7];
        [self addSubview:view8];
        [self addSubview:view9];
        [self addSubview:view10];
        [self addSubview:view11];
        
        
        
        
        
        _cleanImgBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _cleanImgBtn.frame = _cleanImgLabel.frame;
        
        _cleanCacheBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _cleanCacheBtn.frame = _cleanAllCacheLabel.frame;
        
        _feedbackBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _feedbackBtn.frame = _feedbackLabel.frame;
        
        _scoreBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _scoreBtn.frame = _scoreLabel.frame;
        
        _reliefBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _reliefBtn.frame = _reliefLabel.frame;
        
        _transcodingBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _transcodingBtn.frame = _transcodingLabel.frame;
        
        _privacyBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _privacyBtn.frame = _privacyLabel.frame;
        
        [self addSubview:_cleanImgLabel];
        [self addSubview:_cleanAllCacheLabel];
        [self addSubview:_screenLightLabel];
        [self addSubview:_pushNotificationLabel];
        [self addSubview:_feedbackLabel];
        [self addSubview:_scoreLabel];
        [self addSubview:_reliefLabel];
        [self addSubview:_transcodingLabel];
        [self addSubview:_privacyLabel];
        
        [self addSubview:_lightSwitch];
        [self addSubview:_pushSwitch];
        
        [self addSubview:_cleanImgBtn];
        [self addSubview:_cleanCacheBtn];
        [self addSubview:_feedbackBtn];
        [self addSubview:_scoreBtn];
        [self addSubview:_reliefBtn];
        [self addSubview:_transcodingBtn];
        [self addSubview:_privacyBtn];
        
        
        
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
